package com.Maykk.Demo04;

import java.util.LinkedList;

/**
 * @ClassName: Demo08
 * @Description: TODO LinkedList 特有方法
 * @Author: MaykkStar@163.com
 */
public class Demo08 {
    public static void main(String[] args) {
        LinkedList<String> list = new LinkedList<>();
        list.add("JavaSE");
        list.add("MySQL");
        list.add("HTML");
        list.add("CSS");
        list.add("JavaScript");
        list.addFirst("我是添加到最前面的元素");
        list.removeFirst();
        System.out.println(list.getFirst());
        System.out.println(list.getLast());
        list.addLast("我是添加到最后的元素");
        list.removeLast();
        System.out.println(list);
    }
}
